import request from '@/utils/request'

// 查询源码资源列表
export function listCode(query) {
  return request({
    url: '/app/code/list',
    method: 'get',
    params: query
  })
}

// 查询源码资源详细
export function getCode(id) {
  return request({
    url: '/app/code/query/' + id,
    method: 'get'
  })
}

// 新增源码资源
export function addCode(data) {
  return request({
    url: '/app/code/add',
    method: 'post',
    data: data
  })
}

// 修改源码资源
export function updateCode(data) {
  return request({
    url: '/app/code/edit',
    method: 'post',
    data: data
  })
}

// 删除源码资源
export function delCode(id) {
  return request({
    url: '/app/code/remove/' + id,
    method: 'delete'
  })
}

// 导出源码资源
export function exportCode(query) {
  return request({
    url: '/app/code/export',
    method: 'get',
    params: query
  })
}
